<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.Map,cn.com.chec.en.constants.Constants,cn.com.chec.en.util.StringTools"%>
<%
Object obj = request.getAttribute("pageLinkMap");
Map<String,String> pageLinkMap = (Map<String,String>)obj;
%>
<div class="header">
	<div class="t_bar">
		<a href="<%=pageLinkMap.get(Constants.LINK_MAIL)%>">Mail</a>  | 
		<a href="<%=pageLinkMap.get(Constants.LINK_VPN)%>">VPN Link</a>  |  
		<a href="<%=pageLinkMap.get(Constants.LINK_INTER_WEB)%>">Inter Web</a>
		 <span class="lang"> 
			<a href="${basePath}map" class="a1">Website Map</a>  | 
			<a href="${basePath}rss" class="a2">RSS</a>
		</span>
		<span class="lang"> 
			<a href="<%=pageLinkMap.get(Constants.LINK_EN_WEBSITE)%>" class="a1">English</a>  | 
			<a href="<%=pageLinkMap.get(Constants.LINK_CN_WEBSITE)%>" class="a2">中文</a>
		</span>
	</div>
    
    <div class="t_rt"><a href="javascript:void(0);" onClick="setHome(this,'http://en.chec.com.cn');">Set As Home</a><a href="javascript:void(0);" class="a3" onclick="addFavorite('http://en.chec.com.cn','CHINA  HUADIAN ENGINEERING CO., LTD.');">Add To Favorites</a></div>
    <h1 class="logo">
       <a href="${basePath}index.jsp">china huadian</a>
    </h1>
    
    <div class="clear"></div>
    <div class="menu">
	<%
	String requesURI = request.getRequestURI();
	String headerClass = "class=\"on\"" ;
	String homeClass = (requesURI.contains("/index.jsp")) ? headerClass : "" ;
	String newsClass = (requesURI.contains("/news.jsp") || requesURI.contains("/newsDetail.jsp")) ? headerClass : "" ;
	String businessClass = (requesURI.contains("/business.jsp") || requesURI.contains("/biList.jsp") || requesURI.contains("/busiChild.jsp")) ? headerClass : "" ;
	String developmentClass = (requesURI.contains("/development.jsp")) ? headerClass : "" ;
	String storyClass = (requesURI.contains("/story.jsp") || requesURI.contains("/storyDetail.jsp")) ? headerClass : "" ;
	String joinusClass = (requesURI.contains("/joinus.jsp")) ? headerClass : "" ;
	String aboutusClass = (requesURI.contains("/aboutus.jsp") || requesURI.contains("/aboutus-cr.jsp")|| requesURI.contains("/crDetail.jsp")) ? headerClass : "" ;
	%>
       <ul>
       	  <li class="home"><a href="${basePath}"<%=homeClass%>>Home</a></li>
          <li class="li2"><a href="${basePath}news" <%=newsClass%>>${enNews}</a></li>  
          <li class="li3"><a href="${basePath}business" <%=businessClass%>>${enBusiness}</a></li>  
          <li class="li4"><a href="${basePath}business/dev" <%=developmentClass%>>${enDevelopment}</a></li>   
          <li class="li5"><a href="${basePath}story" <%=storyClass%>>${enStory}</a></li>    
          <li class="li6"><a href="${basePath}joinus" <%=joinusClass%>>${enJoinus}</a></li>    
          <li class="li7"><a href="${basePath}aboutus" <%=aboutusClass%>>${enAboutCHC}</a></li>
       </ul>
       <div class="search">
		 <form action="news/search" method="get" accept-charset="UTF-8" onsubmit="return checkit();">
         <input type="text" name="kw" id="kw" value="${kw}" class="s_input" />
         <input type="submit" value="" class="s_bt" />
		</form>
       </div>
    </div>
</div>
<script type="text/javascript">
	function checkit(){
		var v = document.getElementById("kw").value ;
		if(v.replace(/^\s*/g, "").replace(/\s*$/g, "") == ''){
			alert('The keywords cant be null !');
			return false;
		}
	}
</script>